<!DOCTYPE html>
<html>
<head>
	<title>JavaScript 练习</title>
	<meta charset="utf-8">
	<script type="text/javascript">
		var arr = [2,3,4,5,61,76,65];
		console.log(fun(2,8));
		printarr(arr);
		
		
		function fun(a,n){
			var total = 1;
			var i;
			for(i = 0; i < n;i++){
				total *= a; 
			}
			return total;
		}
	
		function printarr(arr){
			var i;
			for(i = 0;i < arr.length;i++){
				console.log(arr[i]);
			}
		}
		
	</script>
</head>
<body>

</body>
</html>